package entities;

/**
 * Objecto que representa um teatro em cache
 * 
 * @author Leonardo Lino Nº45340
 * @author Diogo Pires Nº40351
 */
public class CachedTeatro{

	private Teatro teatro;
	private long timeCreated;
	private long timeUpdated;
	private boolean altered;
	private boolean inReplic;
	
	public CachedTeatro(Teatro teatro, long timeCreated, boolean inReplic){
		this.timeCreated = timeCreated;
		this.timeUpdated = timeCreated;
		this.teatro = teatro;
		altered = false;
	}

	public Teatro getTeatro() {
		return teatro;
	}

	public void setTeatro(Teatro teatro) {
		this.teatro = teatro;
	}

	public long getTimeCreated() {
		return timeCreated;
	}

	public void setTimeCreated(long timeCreated) {
		this.timeCreated = timeCreated;
	}
	
	public void setAltered(){
		altered = true;
	}
	
	public boolean isAltered(){
		return altered;
	}

	public long getTimeUpdated() {
		return timeUpdated;
	}

	public void setTimeUpdated(long timeUpdated) {
		this.timeUpdated = timeUpdated;
	}

	public boolean isInReplic() {
		return inReplic;
	}

	public void setInReplic(boolean inReplic) {
		this.inReplic = inReplic;
	}
}
